import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { Card } from '../../models/dto/card.dto';

@Component({
  selector: 'comp-plate',
  templateUrl: './plate.component.html'
})

export class PlateComponent implements OnInit {

  @Input() card: Card;
  @Output() showCardAction = new EventEmitter<Card>();
  iconByCard: object = {
    抄表: { icon: 'read-meter.png' }, 
    催费: { icon: 'charge.png' }, 
    复电: { icon: 'resumption.png' }, 
    抢修: { icon: 'rush-repair.png' }, 
    巡视: { icon: 'patrol.png' },
    检修: { icon: 'inspection.png' },
    领导看板: { icon: '' }
  };

  constructor() {
    return ;
  }

  ngOnInit() {
    return ;
  }

  cardActions() {
    this.showCardAction.emit(this.card);
  }
}
